#include<stdio.h>

/**
 * 
 */
typedef enum {
    AVAILABLE,
    BORROWED
}Status;

typedef struct 
{
    /* data */
    int id;
    char title[30];
    Status s;
}Book;
// 函数：将状态枚举转换为字符串
const char* statusToString(Status status) {
    switch(status) {
        case AVAILABLE: return "可借";
        case BORROWED: return "已借出";
        default: return "未知状态";
    }
}
int main(){
    Book book1 ={1001,"曼波的自我修养",AVAILABLE};
    Book book2 ={1002,"kkk",AVAILABLE};
    Book book3 ={1003,"Yukon",AVAILABLE};
    Book book[3]={book1,book2,book3};
    printf("========图书管理系统=======\n");
    for(int i=0;i<3;i++){
        printf("book1:%d\t%s\t%s\n",book[i].id,book[i].title,statusToString(book[i].s));
    
    }
    return 0;

}
